<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>教材管理系统</title>
<link href="<%=path%>/static/css/css.css" rel="stylesheet"
	type="text/css" />
</head>
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script language="JavaScript">
	function t() {
		var t = ${not empty requestScope.list ? "false" : "true"};
		if(t==true){
			
		}else{
			var begin = $("#begin").attr("href");
			var next = $("#next").attr("href");
			var pre = $("#pre").attr("href");
			var end = $("#end").attr("href");
			var go = $("#go").attr("action");
			begin = begin + "&list=${requestScope.list}";
			next = next + "&list=${requestScope.list}";
			pre = pre + "&list=${requestScope.list}";
			end = end + "&list=${requestScope.list}";
			go = go + "&list=${requestScope.list}";
			$("#begin").attr("href",begin);
			$("#next").attr("href",next);
			$("#pre").attr("href",pre);
			$("#end").attr("href",end);
			$("#go").attr("action",go);
		}
			
	}
</script>
<body onload="t()">
	<h3 id="subTitle">盘点调整</h3>

	<form action="<%=path%>/stockServlet?status=query&currentPage=0&pre=pandian"
		method="post">
		<table width="90%" border="0" align="center" cellpadding="0"
			cellspacing="0" class="table">
		<tr>
			<td width="20%" align="right" class="title2">架位：</td>
			<td class="within2bg">&nbsp; <input name="cell" type="text"
				class="input2" />(*) <input name="Submit2" type="submit"
				class="input2" value="查询" />
			</td>
		</tr>
		</table>
	</form>

	<form action="<%=path%>/stockCheckServlet?status=add" method="post">
		<table width="90%" border="0" align="center" cellpadding="0"
			cellspacing="0" class="table">
			<tr>
				<td width="20%" align="right" class="title2">盘点数量：</td>
				<td class="within2bg">&nbsp; <input name="count" type="text"
					class="input2" />(*)
				</td>
			</tr>
			</tr>
			<tr>
				<td width="20%" align="right" class="title2">原因：</td>
				<td class="within2bg">&nbsp; <textarea name="remark" rows=2
						cols=17></textarea></td>
			</tr>
			<tr>
				<th colspan="8" class="p4"><span class="title2">带(*)的为必填的内容</span></th>
			</tr>

		</table>

		<center>
			<input name="textfield" type="submit" class="input2" value="调整" /> <input
				name="textfield" type="reset" class="input2" value="重置" />

		</center>
	<HR>

	<table width="90%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="table">
		<tr>
			<th colspan="10" class="p4"><span class="title2">以下为您所得到教材的详细信息</span></th>
		</tr>

		<tr>
			<td width="8%" align="center" class="title2">架位</td>
			<td width="15%" align="center" class="title2">ISBN</td>
			<td width="20%" align="center" class="title2">教材名</td>
			<td width="8%" align="center" class="title2">作者</td>
			<td width="15%" align="center" class="title2">出版社</td>
			<td width="10%" align="center" class="title2">出版日期</td>
			<td width="8%" align="center" class="title2">版次</td>
			<td width="5%" align="center" class="title2">单价</td>
			<td width="5%" align="center" class="title2">数量</td>
			<td width="5%" align="center" class="title2">选择</td>
		</tr>

		<c:forEach var="stock"
			items="${requestScope.pageResults.getResults() }" varStatus="id">
			<tr>
				<td align="center" class="title2">${stock.getCell().getName()}</td>
				<td align="center" class="title2">${stock.getTextBook().getIsbn()}</td>
				<td align="center">${stock.getTextBook().getName() }</td>
				<td align="center">${stock.getTextBook().getAuthor() }</td>
				<td align="center">${stock.getTextBook().getPublishCompany() }</td>
				<td align="center">${stock.getTextBook().getPunlishTime() }</td>
				<td align="center">${stock.getTextBook().getEdit() }</td>
				<td align="center">${stock.getTextBook().getPrice() }</td>
				<td align="center">${stock.getAmount() }</td>
				<td class="within2bg">&nbsp; 
				<input type="checkbox" name="checkbox" value="${stock.getId()}">
				</td>
			</tr>
		</c:forEach>
	</table>
</form>
		<table width="90%" border="0" align="center" cellpadding="3"
			cellspacing="0" id="page">
			<tr>
				<td align="right">共有记录
					${requestScope.pageResults.getTotalCount()}条 第
					${requestScope.pageResults.getCurrentPage()}/
					${requestScope.pageResults.getPageCount()}页 <a
					href="<%=path%>/stockMoveServlet?status=${requestScope.status}&currentPage=0"
					id="begin">首页</a> <a
					href="<%=path%>/stockMoveServlet?status=${requestScope.status}&currentPage=${requestScope.pageResults.getCurrentPage()-1}"
					id="pre">上一页</a> <a
					href="<%=path%>/stockMoveServlet?status=${requestScope.status}&currentPage=${requestScope.pageResults.getPageNo()}"
					id="next">下一页</a> <a
					href="<%=path%>/stockMoveServlet?status=${requestScope.status}&currentPage=${requestScope.pageResults.getPageCount()}"
					id="end">末页</a>
				</td>
			</tr>
		</table>
</body>
</html>